home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / PolyEd / Install < prev    next >
Text File  |  1996-09-26  |  6KB  |  263 lines

  1. ; $VER: Install 2.0 (12-3-1994)
  2. ; Script to install PolyEd
  3.  
  4. (complete 0)
  5.  
  6. ;=============================================================================
  7. ; strings
  8.  
  9. (set #bad-kick
  10. (cat "You must be using Kickstart 2.0 or higher to install PolyEd."
  11. ))
  12.  
  13. (set #which-language
  14. (cat "\nWhich languages should be installed?"
  15. ))
  16.  
  17. (set #which-language-help
  18. (cat "\nThe Amiga can be operated in many different "
  19.      "languages. "
  20.      "To reduce the amount of space consumed by the "
  21.      "language files, you can select only the "
  22.      "files of specific languages to be copied.\n\n"
  23.      "Check the boxes of the languages you wish "
  24.      "to have available on your system.\n\n"
  25.      @askoptions-help
  26. ))
  27.  
  28. (set #startup-help
  29. (cat "\nAn assign to the PolyEd drawer called PED: "
  30.      "and the inclusion of that assign to the "
  31.      "paths where AmigaOS looks for programs is "
  32.      "being added to the user-startup"
  33. ))
  34.  
  35.  
  36. ;=============================================================================
  37. ; make sure we are running under V37+
  38.  
  39. (set osversion (/ (getversion) 65536))
  40. (if (< osversion 37)
  41. (
  42.     (abort #bad-kick)
  43. ))
  44.  
  45.  
  46. ;=============================================================================
  47. ; get target
  48.  
  49. (set old_level @user-level)    ; remember user-level
  50. (user 2)
  51.  
  52. (set target (askdir (prompt "Where do you want the PolyEd drawer to be placed in?")
  53.             (help @askdir-help)
  54.             (default "SYS:Tools")
  55.         )
  56. )
  57. (user old_level)
  58. (set @default-dest target)
  59.  
  60. ;=============================================================================
  61. ; which languages should be installed?
  62.  
  63. (user 2)
  64. (set lang (askoptions (prompt #which-language)
  65.               (help #which-language-help)
  66.               (choices
  67. ;                    "Dansk"
  68.                     "Deutsch"
  69.                     "English"
  70. ;                    "Español"
  71. ;                    "Français"
  72. ;                    "Italiano"
  73. ;                    "Nederlands"
  74. ;                    "Norsk"
  75. ;                    "Português"
  76. ;                    "Svenska"
  77.                 )
  78.               (default -1)
  79.       )
  80. )
  81. (user old_level)
  82.  
  83. ;=============================================================================
  84. ; make some drawers
  85.  
  86. (set supertarget target)
  87. (set target (tackon target "PolyEd"))
  88. (makedir target (infos) (prompt "Creating some drawers..."))
  89. (makedir (tackon target "Doc"))
  90. (makedir (tackon target "Icons"))
  91. (makedir (tackon target "Catalogs"))
  92.  
  93. ;=============================================================================
  94. ; Copy required libraries for V37
  95.  
  96. (if (= osversion 37)
  97. (
  98.     (working "Installing libraries to Libs:")
  99.     (copylib
  100.         (help #v37needslibs)
  101.         (source "reqtools.library")
  102.         (dest "LIBS:")
  103.         (nogauge)
  104.     )
  105.  
  106.     (copylib
  107.         (help #v37needslibs)
  108.         (source "amigaguide.library")
  109.         (dest "LIBS:")
  110.         (nogauge)
  111.     )
  112. ))
  113.  
  114. (complete 10)
  115.  
  116. ;=============================================================================
  117. ; copy main-program
  118.  
  119. (copyfiles (prompt "")
  120.        (help @copyfiles-help)
  121.        (source "ped")
  122.        (infos)
  123.        (dest target)
  124. )
  125.  
  126. (copyfiles (prompt "")
  127.        (help @copyfiles-help)
  128.        (source "ReadMe")
  129.               (infos)
  130.        (optional nofail)
  131.        (dest target)
  132.        (nogauge)
  133. )
  134.  
  135. (complete 50)
  136.  
  137. ;=============================================================================
  138. ; copy documentation and catalogs
  139. (working "Installing Documentation and Catalogs")
  140.  
  141. ; Copy arexx documentation (only english)
  142. (copyfiles (optional nofail)
  143.              (source "Doc")
  144.               (dest (tackon target "Doc"))
  145.            (pattern "arexx.#?")
  146.            (infos)
  147.            (nogauge)
  148. )
  149.  
  150. (set n 0)
  151. (while (set language (select n
  152. ;                    "Dansk"
  153.                     "Deutsch"
  154.                     "English"
  155. ;                    "Español"
  156. ;                    "Français"
  157. ;                    "Italiano"
  158. ;                    "Nederlands"
  159. ;                    "Norsk"
  160. ;                    "Português"
  161. ;                    "Svenska"
  162.                     ""
  163.              )
  164.        )
  165. (
  166.     (if (IN lang n)
  167.     (
  168.         (if (<> 1 n)    ; FIXME: Wenn Dansk verfügbar, 1 auf 2 ändern (entspricht englisch, das als Default keinen Catalog hat!)
  169.         (
  170.             (set catalog-dir (tackon (tackon target "Catalogs") language ))
  171.             (makedir catalog-dir)
  172.             (copyfiles
  173.                 (optional nofail)
  174.                 (source (cat "Catalogs/" language "/polyed.catalog"))
  175.                    (dest catalog-dir)
  176.                 (nogauge)
  177.             )
  178.         ))
  179.         (set #from (cat "Doc/" language ".guide"))
  180.         (if (exists #from)
  181.             (copyfiles
  182.                 (optional nofail)
  183.                 (source #from)
  184.                 (dest (tackon target "Doc"))
  185.                 (infos)
  186.                 (nogauge)
  187.             )
  188.         )
  189.     ))
  190.     (set n (+ n 1))
  191. ))
  192.  
  193. (complete 70)
  194.  
  195. ;=============================================================================
  196. ; copy Macros
  197.  
  198. (working "Installing ARexx Macros")
  199.  
  200. (copyfiles
  201.     (source "Macros")
  202.     (dest (tackon target "Macros"))
  203.     (optional nofail)
  204.     (all)
  205.     (infos)
  206.         (nogauge)
  207. )
  208.  
  209. (complete 80)
  210.  
  211. ;=============================================================================
  212. ; copy Icons
  213.  
  214. (working "Installing Icons")
  215.  
  216. (copyfiles
  217.     (source "Icons")
  218.     (dest (tackon target "Icons"))
  219.     (optional nofail)
  220.     (pattern "#?.info")
  221.     (infos)
  222.         (nogauge)
  223. )
  224.  
  225. ; PolyEd Drawer
  226. (copyfiles
  227.     (source "Icons.info")
  228.    (dest supertarget)
  229.    (newname "PolyEd.info")
  230.    (infos)
  231.    (nogauge)
  232. )
  233.  
  234. (complete 90)
  235.  
  236. ;------------------------------------------------------------
  237. ; Copy keyfile for registrated users
  238. ;------------------------------------------------------------
  239.  
  240. (if (exists "ped.key")
  241. (
  242.     (working "Installing Keyfile")
  243.     (copyfiles
  244.         (source "ped.key")
  245.         (dest target)
  246.         (optional nofail)
  247.         (infos)
  248.         (help @copyfiles-help)
  249.     )
  250. ))
  251.  
  252. ;=============================================================================
  253. ; Make user-startup entries
  254.  
  255. (startup "PolyEd"
  256.     (prompt    "Some instructions need to be added to the \"S:user-startup\" so that your system will be properly configured to use PolyEd.")
  257.     (help #startup-help)
  258.     (command (cat "assign >NIL: PED: " target "\n"))
  259.     (command "path >NIL: PED: add")
  260. )
  261.  
  262. (complete 100)
  263.